package com.bawei.library_base.room.paygood;

import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

/**
 * @author : zhiyu
 * @date : 2021/12/22
 * @content :
 */

@Entity
public class PayGood {
    @PrimaryKey(autoGenerate = true)
    private Long pid;

    //商品名称
    private String pname;
    //商品价格
    private String pprice;
    //商品图片
    private String pimgUrl;
    //商品的id
    private long pgood_id;
    //添加数量
    private int pcount=0;
    //是否选中
    private boolean pcheck=false;


    @Override
    public String toString() {
        return "PayGood{" +
                "pid=" + pid +
                ", pname='" + pname + '\'' +
                ", pprice='" + pprice + '\'' +
                ", pimgUrl='" + pimgUrl + '\'' +
                ", pgood_id=" + pgood_id +
                ", pcount=" + pcount +
                ", pcheck=" + pcheck +
                '}';
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getPprice() {
        return pprice;
    }

    public void setPprice(String pprice) {
        this.pprice = pprice;
    }

    public String getPimgUrl() {
        return pimgUrl;
    }

    public void setPimgUrl(String pimgUrl) {
        this.pimgUrl = pimgUrl;
    }

    public long getPgood_id() {
        return pgood_id;
    }

    public void setPgood_id(long pgood_id) {
        this.pgood_id = pgood_id;
    }

    public int getPcount() {
        return pcount;
    }

    public void setPcount(int pcount) {
        this.pcount = pcount;
    }

    public boolean isPcheck() {
        return pcheck;
    }

    public void setPcheck(boolean pcheck) {
        this.pcheck = pcheck;
    }

    @Ignore
    public PayGood() {
    }

    public PayGood(Long pid, String pname, String pprice, String pimgUrl, long pgood_id, int pcount, boolean pcheck) {
        this.pid = pid;
        this.pname = pname;
        this.pprice = pprice;
        this.pimgUrl = pimgUrl;
        this.pgood_id = pgood_id;
        this.pcount = pcount;
        this.pcheck = pcheck;
    }
}
